function Timer(period, callback) {
	this.period = period;
	this.callback = callback;
	this.taskId = null;
}

Timer.prototype.start = function() {
	if(this.taskId == null) {
		this.taskId = setInterval(this.callback, this.period);
	}
}

Timer.prototype.stop = function() {
	if(this.taskId != null) {
		clearInterval(this.taskId);
		this.taskId = null;
	}
}